package com.warmheart.builder.user;

import com.warmheart.core.rs.base.BaseRsBuilder;
import com.warmheart.core.rs.oper.Rs;
import com.warmheart.entity.user.UserRoleMap;

/**
 * 
 * @ClassName: UserRoleMap
 * @Description: 用户角色关联实体RsBuilder类，对应表名称为tb_user_role_map
 *               温馨提示：不要修改该实体RsBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午13:05:35
 *
 */
public class UserRoleMapRsBuilder extends BaseRsBuilder<UserRoleMap, UserRoleMapRsBuilder> {

    private final UserRoleMap t;

    @Override
    protected UserRoleMapRsBuilder self() {
        return this;
    }

    @Override
    public UserRoleMap core() {
        return this.t;
    }

    public UserRoleMapRsBuilder(UserRoleMap userRoleMap) {
        t = userRoleMap;
    }

    /**
     * 用户ID
     */
    private Rs<UserRoleMap, UserRoleMapRsBuilder> userId;

    /**
     * 角色ID
     */
    private Rs<UserRoleMap, UserRoleMapRsBuilder> roleId;

    public Rs<UserRoleMap, UserRoleMapRsBuilder> userId() {
        if (this.userId == null) {
            this.userId = new Rs<UserRoleMap, UserRoleMapRsBuilder>(self(), "user_id", "userId");
        }
        return this.userId;
    }

    public Rs<UserRoleMap, UserRoleMapRsBuilder> roleId() {
        if (this.roleId == null) {
            this.roleId = new Rs<UserRoleMap, UserRoleMapRsBuilder>(self(), "role_id", "roleId");
        }
        return this.roleId;
    }
}